import fly from '@/utils/request'
import URL from '@/utils/host'

// 签到状态
export function sign(data){
    return fly.request({
        method: 'get', 
        url:URL.host2+'sign',
        params: data
    })
}
// 去签到
export function tosign(data){
    return fly.request({
        method: 'post', 
        url:URL.host2+'sign/sign',
        params: data
    })
}
//搜索
export function search(data){
    return fly.request({
        method: 'get', 
        url:URL.host2+'index/search',
        params: data
    })
}
//二维码
export function code(data){
    return fly.request({
        method: 'get', 
        url:URL.host2+'code',
        params: data
    })
}

// 点赞
export function like(data){
    return fly.request({
        method: 'post', 
        url:URL.host2+'action/zan',
        body: data
    })
}
// 评论
export function comment(data){
    return fly.request({
        method: 'post', 
        url:URL.host2+'action/comment',
        body: data
    })
}
// 展示评论
export function showComment(data){
    return fly.request({
        method: 'get', 
        url:URL.host2+'show/comment',
        params: data
    })
}
// 点赞评论
export function zanComment(data){
    return fly.request({
        method: 'post', 
        url:URL.host2+'action/comment/zan',
        body: data
    })
}
// 收藏
export function collectA(data){
    return fly.request({
        method: 'post', 
        url:URL.host2+'action/collect',
        body: data
    })
}
// 举报
export function report(data){
    return fly.request({
        method: 'post', 
        url:URL.host2+'action/report',
        body: data
    })
}
//关注
export function follow(data){
    return fly.request({
        method: 'post', 
        url:URL.host2+'user/guanzhu/'+data.id,
        body: data
    })
}